<!--
 * @Author: wangming
 * @Date: 2021-04-23 13:45:47
 * @LastEditors: wangming
 * @LastEditTime: 2021-10-12 16:46:08
 * @Description: file content
-->
<route>
{
  "meta":{
    "title":"流程中心",
    "localism": "sys.process_center"
  }
}
</route>
<template>
  <div class="ks-row hmax layoutbox">
    <tabNav
      :list="list"
      class="w200 hmax ovya bgwh mr20"
      v-model="tabvalue"
    ></tabNav>
    <div class="ks-col hmax ovya bgwh">
      <component :is="tabvalue"></component>
    </div>
  </div>
</template>

<script>
import i18n from '../../../i18n'
import templates from "../__components__/index";
import { mapGetters } from "vuex";
export default {
  components: { ...templates },
  data() {
    return {
      tabvalue: "todo",
      list: [
        {
          label: i18n.t("sys.my_to_do_list"),
          value: "todo",
          length: 0,
        },
        {
          label: i18n.t("sys.my_application"),
          value: "apply",
          length: 0,
        },
        {
          label: i18n.t("sys.my_own_office"),
          value: "done",
          length: 0,
        },
        {
          label: i18n.t("sys.delegated_authorization"),
          value: "auth",
          length: 0,
        },
      ],
    };
  },
  computed: {
    ...mapGetters(["getProcessNum"]),
  },
  watch: {
    getProcessNum: {
      handler: function (val) {
        this.$nextTick(() => {
          this.list[0].length = val;
        });
      },
      immediate: true,
      deep: true,
    },
  },
  methods: {},
};
</script>

<style lang="scss" scoped>
.hmax {
  height: 100%;
}
</style>
